package pers.qianyu.module.core.domain.system.dto;

import org.hibernate.validator.constraints.*;
import pers.qianyu.module.core.domain.system.group.*;

import javax.validation.constraints.NotBlank;
import java.io.*;

/**
 * @author mizzle rain
 * @date 2020-11-12 14:41
 */
public class SysUserDTO implements Serializable {
    private static final long serialVersionUID = 630427834706566781L;
    @NotBlank(message = "用户名不能为空", groups = {SysUserInsertValidationGroup.class})
    private String username;
    @NotBlank(message = "用户密码不能为空", groups = {SysUserInsertValidationGroup.class})
    private String password;
    @NotBlank(message = "用户昵称不能为空", groups = {SysUserInsertValidationGroup.class})
    private String nickname;
    @Range(max = 2, min = 0, message = "用户类型只能是 1 或 0 或 2 ")
    private Integer type;
    @NotBlank(message = "用户名邮箱不能为空", groups = {SysUserInsertValidationGroup.class})
    private String email;
    private String phone;
    @Range(max = 1, min = 0, message = "用户性别只能是 1 或 0 ")
    private Integer gender;
    private String avatar;
    @Range(max = 1, min = 0, message = "用户状态只能是 1 或 0 ")
    private Integer status;
    private String remark;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "SysUserDTO{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", type=" + type +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", gender=" + gender +
                ", avatar='" + avatar + '\'' +
                ", status=" + status +
                ", remark='" + remark + '\'' +
                '}';
    }
}
